package com.github.hwangrq.minicat.container;

import java.util.ArrayList;
import java.util.List;

/**
 * @author hwangrq
 * @date 2021/3/16 23:19
 * @description  作为配置中的主机信息，每个主机下面有自己的 Context 项目集合
 */
public class Host {

    private String name;
    private List<Context> contextList = new ArrayList<>();

    public Host() {}

    public Host(String name, List<Context> contextList) {
        this.name = name;
        this.contextList = contextList;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<Context> getContexts() {
        return contextList;
    }

    public void setContexts(List<Context> contextList) {
        this.contextList = contextList;
    }

    public void addContext(Context context) {
        contextList.add(context);
    }
}
